#ifndef THEMEICONLABEL_H
#define THEMEICONLABEL_H

#include <QObject>
#include <QWidget>
#include <QLabel>

#include "drawiconlabel.h"

class ThemeIconLabel : public QLabel
{
    Q_OBJECT
public:
    ThemeIconLabel(QWidget *parent = nullptr);
    ThemeIconLabel(const QPixmap &pixmap, QWidget *parent = nullptr);
    ThemeIconLabel(QStringList iStringList, QWidget *parent = nullptr);
    ThemeIconLabel(QList<QPixmap> iconList, QWidget *parent = nullptr);

    QPixmap pixmapToRound(const QString &filePath, const QSize &scaledSize);
    QPixmap pixmapToRound(const QPixmap &pixmap, const QSize &scaledSize);
    void setRadius(int radius);
    void setIcon(const QPixmap &pixmap);

protected:
    void leaveEvent(QEvent * event);
    void enterEvent(QEvent * event);
    void paintEvent(QPaintEvent *event);

private:
    DrawIconLabel *mPictrueLabel = nullptr;
    QStringList mIconList;
    int mRadius = 10;

Q_SIGNALS:
    void enterWidget();
    void leaveWidget();
};

#endif // THEMEICONLABEL_H
